<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/jquery-3.5.1.js"></script>
    <style type="text/css">
        .inner{
            background-color: aqua;
            width: 150px;
            height: 100px;
        }
    </style>
</head>
<body>

<div style="background-color: red;" id="outer">
    <div id="inner"> </div>
</div>
<button type="button" onclick="change()">改变</button>
<script type="text/javascript">
    function change() {
        $("#outer").css("width", "300px").css("height", "200px");
        $("#inner").addClass("inner").addClass("xxx") ;
    }
</script>
</body>
</html>